package com.xc.string;

public class FanzhuanString {
    public static void main(String[] args) throws Exception {
     String string="  the sky is blue ";
        String[] s = string.split(" ");
        System.out.println(s.length);
        for (String s1:s){
            System.out.println(s1);
        }
        String x=s[s.length-1];
        for (int i =s.length - 2;i>=0; i--){
           if (!s[i].equals("")){
               x+=" "+s[i];
           }
        }

    }

//    翻转字符串里的单词


    //思路


}
